package com.zx.tfw.entity;

import com.zx.tfw.enums.SkilledEnum;

/**
 * @Project: tfw
 * @Title: tfwByTypeDto
 * @Description: 按照typeCode分组的数据模型
 * @author: xue.zhang
 * @date: 2019年1月30日下午3:24:26
 * @company: alibaba
 * @Copyright: Copyright (c) 2017
 * @version v1.0
 */
public class tfwByTypeCodeDto {
	/**
	 * 主键id
	 */
	private Integer id;

	/**
	 * 名称缩写
	 */
	private String nameAcronym;
	
	/**
	 * 英文名称
	 */
	private String nameEn;
	
	/**
	 * 中文名称
	 */
	private String nameZh;
	
	/**
	 * 技术熟练度,1=知道技术,2=简单使用,3=熟练使用,4=熟悉原理,5=熟读源码
	 */
	private Integer skilledCode;
	
	/**
	 * 技术熟练度对应的三基色
	 */
	private String skilledBackgroundColor;
	
	public tfwByTypeCodeDto() {	}
	
	public tfwByTypeCodeDto(TechnicalFramework tfw) {
		this.id = tfw.getId();
		this.nameAcronym = tfw.getNameAcronym();
		this.nameEn = tfw.getNameEn();
		this.nameZh = tfw.getNameZh();
		this.skilledCode = tfw.getSkilledCode();
		SkilledEnum skilledEnum = SkilledEnum.asMap().get(this.skilledCode);
		if(skilledEnum != null) {
			this.skilledBackgroundColor = skilledEnum.getBackgroundColor();
		}
		
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNameAcronym() {
		return nameAcronym;
	}

	public void setNameAcronym(String nameAcronym) {
		this.nameAcronym = nameAcronym;
	}

	public String getNameEn() {
		return nameEn;
	}

	public void setNameEn(String nameEn) {
		this.nameEn = nameEn;
	}

	public String getNameZh() {
		return nameZh;
	}

	public void setNameZh(String nameZh) {
		this.nameZh = nameZh;
	}

	public Integer getSkilledCode() {
		return skilledCode;
	}

	public void setSkilledCode(Integer skilledCode) {
		this.skilledCode = skilledCode;
	}

	public String getSkilledBackgroundColor() {
		return skilledBackgroundColor;
	}

	public void setSkilledBackgroundColor(String skilledBackgroundColor) {
		this.skilledBackgroundColor = skilledBackgroundColor;
	}

}